import request from '/@/utils/request';

export function agentInfo() {
    return {
        queryAgentList: (data:object) => {
            return request({
                url: 'agent/index',
                method: 'post',
                data
            });
        },
        editAgent: (data:object) => {
            return request({
                url: 'agent',
                method: 'post',
                data
            });
        },
        openAgent: (id:string) => {
            return request({
                url: 'agent/open/'+id,
                method: 'patch'
            });
        },
        frozenAgent: (id:string) => {
            return request({
                url: 'agent/frozen/'+id,
                method: 'patch'
            });
        },
        freeAgent: (id:string) => {
            return request({
                url: 'agent/free/'+id,
                method: 'patch'
            });
        },
    };
}
